package com.tueye.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.dao.ITopicCommentDao;
import com.tueye.entity.TopicComment;
import com.tueye.entity.user.Flowers;
import com.tueye.service.ITopicCommentService;
import com.tueye.service.exception.TuEyeServiceException;

/**
 * 
 * @author hanxiaowei
 *
 */
@Scope("prototype")
@Component("topicCommentService")
public class TopicCommentServiceImpl extends BaseService implements ITopicCommentService{

	@Autowired
	@Qualifier("topicCommentDao")
	private ITopicCommentDao topicCommentDao;
	
	@Override
	public void addTopicComment(TopicComment topicComment)
			throws TuEyeServiceException {
		
		this.topicCommentDao.addTopicComment(topicComment);
	}

	@Override
	public void deleteTopicComment(String tcId) throws TuEyeServiceException {
		this.topicCommentDao.deleteTopicComment(tcId);
		
	}

	@Override
	public List<TopicComment> getTopicCommentByHql(String hql)
			throws TuEyeServiceException {
		
		return this.topicCommentDao.getTopicCommentByHql(hql);
	}

	@Override
	public TopicComment getTopicCommentById(String tcId)
			throws TuEyeServiceException {
		
		return this.topicCommentDao.getTopicCommentById(tcId);
	}

	@Override
	public void addFlowers(Flowers flowers) throws TuEyeServiceException {
		this.topicCommentDao.addFlowers(flowers);
		
	}

}
